<?php
/**
 * Created by PhpStorm.
 * User: yanggang
 * Date: 2019/4/29
 * Time: 4:11 PM
 */

namespace app\common\model;


class AdminAccount extends BaseModel
{
    public $levellist = array(1=>'总管理员',2=>'基本管理员');

    public function getLevelNameAttr($value,$data){
        return isset($this->levellist[$data['level']]) ? $this->levellist[$data['level']] : '';
    }

    public static function getStatusNameAttr($value,$data){
        $arr = array(0=>'禁用',1=>'正常');
        return isset($arr[$data['status']]) ? $arr[$data['status']] : '';
    }
}